import request from '@/utils/request'

export function login(params) {
  return request({
    url: '/oauth/sys/pass',
    method: 'post',
    data: params
  })
}

export function getInfo(token) {
  return request({
    url: '/vue-element-admin/user/info',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/vue-element-admin/user/logout',
    method: 'post'
  })
}

export function menuMine() {
  return request({
    url: '/sys/platform/menu/current',
    method: 'get'
  })
}

export function currentUserInfo() {
  return request({
    url: '/sys/platform/emp/current',
    method: 'get'
  })
}

export function modifyPassword(params) {
  return request({
    url: '/sys/platform/emp/reset',
    method: 'post',
    data: params
  })
}
